package com.tensquare.qa.client;

import entity.Result;
import entity.StatusCode;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

//备用方案
@Component
public class LabelClientImpl implements LabelClient  {

   // 查 根据ID查询label , 如果远程调用失败, 熔断器启动, 远程调用会使用该方法代替远程调用
   @RequestMapping(value = "/label/{labelId}" , method = RequestMethod.GET)
   public Result findById(@PathVariable("labelId") String labelId){
         return new Result(true, StatusCode.OK,"熔断器备用方案启动!");
   }

}
